﻿using Lucid.ESA.ClientDataSystem.Application.Contracts;
using Lucid.ESA.ClientDataSystem.Application.Implementations;
using Lucid.ESA.ClientDataSystem.Data.Common;
using Lucid.ESA.ClientDataSystem.Data.Repositories;
using Lucid.ESA.ClientDataSystem.Domain.RepositoryContracts;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using StructureMap;

namespace Lucid.ESA.ClientDataSystem.IntegrationTests
{
    [TestClass]
    public class AssemblyInitializer
    {
        [AssemblyInitialize()]
        public static void AssemblyInitialize(TestContext context)
        {
            ObjectFactory.Initialize(x =>
            {
                x.For<IClientService>().Use<ClientService>();
                x.For<IClientRepository>().Use<ClientRepository>();
                x.For<ISiteService>().Use<SiteService>();
                x.For<ISiteRepository>().Use<SiteRepository>();
                x.For<IContactService>().Use<ContactService>();
                x.For<IContactRepository>().Use<ContactRepository>();
                x.For<ITransactionProvider>().Use<TransactionProvider>();
            });

            SessionProvider.CurrentTestContext = context;
        }
    }
}
